import http from '@/utils/request'


//发送验证码
export const getCode = (data) => {
  http.post('/get/code', data)
}

//注册用户
export const userAuthentication = (data) => {
  return http.post('/user/authentication', data)
}

export const login = (data) => {
  return http.post('/login', data)
}

export const authAdmin = (params) => {
  return http.get('/auth/admin', { params })

}

//菜单权限数据
export const userGetmenu = () => {
  return http.get('/user/getmenu')
}

//菜单权限修改

export const userSetmenu = (data) => {
  return http.post('/user/setmenu', data)
}

//菜单权限列表
export const menuList = (params) => {
  return http.get('/menu/list', { params })
}

//权限下拉列表
export const menuSelectlist = () => {
  return http.get('/menu/selectlist')
}

//用户数据修改
export const updateUser = (data) => {
  return http.post('/update/user', data)
}

//用户菜单权限
export const menuPermissions = () => {
  return http.get('/menu/permissions')

}

//陪护列表

export const companionList = (params) => {
  return http.get('/companion/list', { params })
}

//照片列表
export const photoList = () => {
  return http.get('/photo/list')
}

//陪护师创建
export const companion = (data) => {
  return http.post('/companion', data)
}

//陪护师删除
export const deleteCompanion = (data) => {
  return http.post('/delete/companion', data)
}
//订单列表渲染
export const adminOrder = (params) => {
  return http.get('/admin/order', { params })
}
//订单服务状态改变
export const updateOrder = (data) => {
  return http.post('/update/order', data)
}